package liumengbaio.lolzhangyoubao.Activity.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.squareup.picasso.Picasso;

import liumengbaio.lolzhangyoubao.R;

/**
 * Created by lanouhn on 16/9/2.
 */
public class MoreSkillDetails extends AppCompatActivity {

    private ImageView icon,back;
    private TextView name, content, cold, level;
    private String id;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.more_skill_details);
        initView();
        initData();
        initEvent();
    }

    private void initView() {
        icon = (ImageView) findViewById(R.id.more_third_icon);
        name = (TextView) findViewById(R.id.more_third_name);
        content = (TextView) findViewById(R.id.more_third_content);
        cold = (TextView) findViewById(R.id.more_third_cold);
        level = (TextView) findViewById(R.id.more_third_level);
        back= (ImageView) findViewById(R.id.more_details_back);
    }

    private void initData() {
        Intent intent = getIntent();
        String name1 = intent.getStringExtra("name");
        name.setText(name1);
        String content1 = intent.getStringExtra("desc");
        content.setText(content1);
        String cold1 = intent.getStringExtra("cold");
        cold.setText("冷却：" + cold1);
        String level1 = intent.getStringExtra("level");
        level.setText("等级：" + level1);
        String icon1 = intent.getStringExtra("pic_url");
        Picasso.with(this).load(icon1).into(icon);
        id = intent.getStringExtra("id");
    }
    private void initEvent(){
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
